package kr.hyunist.androidcomplete01saeildamil.ch13;

import kr.hyunist.androidcomplete01saeildamil.*;
import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;

public class ProgressbarTest extends Activity {
	ProgressBar mProgress;
	ProgressBar mProgCircle;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.progressbartest);
		
		mProgress = (ProgressBar) findViewById(R.id.progressBarTest1);
		mProgCircle = (ProgressBar) findViewById(R.id.progressBarTest2);
	}
	
	public void mOnClick(View v){
		switch(v.getId()){
		case R.id.progressbardecbtn1:
			mProgress.incrementProgressBy(-2);
			break;
			
		case R.id.progressbarincbtn1:
			mProgress.incrementProgressBy(2);
			break;
			
		case R.id.progressbardecbtn2:
			mProgress.incrementSecondaryProgressBy(-2);
			break;
			
		case R.id.progressbarincbtn2:
			mProgress.incrementSecondaryProgressBy(2);
			break;
			
		case R.id.progressbarstartbtn:
			mProgCircle.setVisibility(View.VISIBLE);
			break;
			
		case R.id.progressbarstopbtn:
			mProgCircle.setVisibility(View.INVISIBLE);
			break;
		}
	}
}
